<template>
  <div>-----{{ num }}</div>
  <div>---------{{ obj.name }}</div>
  <button @click="btn">点击</button>
</template>

<script>
import { ref } from "vue";
export default {
  setup() {
    const num = ref(100);
    const obj = ref({
      name: "杨逍",
    });
    const btn = () => {
      console.log(num.value);
      console.log(obj.value.name);
      num.value++;
    };
    return { num, obj, btn };
  },
};
</script>

<style></style>
